package com.xyx.ssm.jdbcdao;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.xyx.ssm.po.SyRole;
import com.xyx.ssm.po.Syroleauthority;

@Repository
public class SyroleDao extends BaseDao {

	 public int syroleadd(Map<String, Object> map) {

		int num = sqlSession.insert(
				"com.xyx.ssm.jdbcdao.syroleDao.syroleadd", map);

		return num;
	}

	public int syroleDelete(Integer ids) {
		int num = sqlSession.delete(
				"com.xyx.ssm.jdbcdao.syroleDao.syroledelect", ids);

		return num;

	}
	
	public int syroleUpdate(SyRole syRole){
		int num=sqlSession.update("com.xyx.ssm.jdbcdao.syroleDao.syroleupdata", syRole);
		return num;
		
	}
	
	public List<SyRole> syroleId(Integer id){
		List<SyRole> list=sqlSession.selectList("com.xyx.ssm.jdbcdao.syroleDao.syroleid", id);
		return list;
		
	}

	public int insertroleauthority(Syroleauthority ra) {
		int num=sqlSession.insert("com.xyx.ssm.jdbcdao.syroleDao.insertroleauthority", ra);
		return num;
	}
}